package com.itheima.d2_array;

import java.util.Random;

public class Test16 {
    public static void main(String[] args) {
        int[] a = new int[10];
        Random r = new Random();
        for (int i = 0; i < a.length; i++) {
            a[i] = r.nextInt(10) + 1;
            System.out.println(a[i]);
        }
        int ma = a[0];
        for (int s = 0; s < a.length; s++) {
            if (a[s] < ma){
                ma = a[s];
            }

        }
        System.out.println("最大值" + ma);
        System.out.println("平均值" + ma / a.length);
    }
}
